<template>
  <div class="app-container" v-loading="pageLoading">
    <!-- <el-button type="primary" class="fr" @click="createItem" v-permission="'toolingType.add'">创建</el-button> -->
    <div class="filter-container">
      <el-input style="width: 300px;" placeholder="输入接受信息的设备名称查询" clearable prefix-icon="el-icon-search"
        class="filter-item" @keyup.enter.native="research" @clear="research" v-model="query.from_machine_name">
      </el-input>
      <el-button class="filter-item" type="success" plain @click="research">查询</el-button>
      <!-- <el-button class="filter-item" type="info" plain @click="exportData" :loading="exportLoading">导出
      </el-button> -->
    </div>
    <z-table :list="list" :tableProps="tableProps" :columns="columns" @editItem="editItem" @deleteItem="deleteItem">
      <!-- <template v-slot:operation="v">
        <a href="#" class="text-blue" @click.prevent="editItem(v.row,v.$index)" v-permission="'toolingType.edit'">编辑</a>
        <span>&nbsp;</span>
        <span>&nbsp;</span>
        <a href="#" class="text-red" @click.prevent="deleteItem(v.row,v.$index)"
          v-permission="'toolingType.delete'">删除</a>
      </template> -->
    </z-table>
    <z-pagination :pagination="pagination" :total="total" :page.sync="query.page" :limit.sync="query.size"
      @change="getList"></z-pagination>
  </div>
</template>

<script>
import commonMixin from '@/views/_common/mixin'
export default {
  mixins: [commonMixin],
  name: 'search',
  data: function () {
    return {
      apiList: this.$api.scada,
      name: '设备交互记录查询',
      columns: [
        { title: '接受信息的设备名称', key: 'from_machine_name' },
        { title: '发送信息的设备名称', key: 'come_machine_name' },
        { title: '硬件传输的信息', key: 'machine_sendmessage' },
        { title: '创建人', key: 'create_user' },
        { title: '创建时间', key: 'create_time' },
        { title: '修改人', key: 'modify_user' },
        { title: '修改时间', key: 'modify_time' },
      ],
      query: {
        from_machine_name: '',
        page: 1,
        size: 10,
      },
      initData: {},
      tableProps: {
        border: true,
        hideOperations: true,
      },
      postForList: 'post',
    }
  },
  methods: {},
  created: function () {
    this.getList()
  },
}
</script>
<style scoped>
</style>
